//
// Created by wubh2 on 2023/2/27.
//

#ifndef BSP_UART_H
#define BSP_UART_H

#include "FreeRTOS.h"
#include "queue.h"
#include "usart.h"

#define RX_BUFFER_SIZE 200
//老板子中使用的是uart5
#define USE_UART huart6

typedef struct {
    UART_HandleTypeDef *huart;
//    uint32_t            rx_usart_dma_buffer_size;
    uint8_t tx_finish_flag;
    //osEventFlagsId_t event;
//    uint8_t             * rx_usart_dma_memory_base_address;
    //uart_dma_rxdata_t uart_dma_rxdata;
} usart_param_struct;

extern QueueHandle_t rxQueue;
extern QueueHandle_t txQueue;

void StartReception(void);
void usart_dma_send(usart_param_struct *usart_param, const uint8_t *pData, uint32_t _size);


#endif //BSP_UART_H
